package pinkblob.test;

import iss.test.SendRequirementsMail;

import java.util.Date;
import java.util.Map;

import org.apache.log4j.Logger;


import java.util.HashMap;

import pinkblob.event.DatabaseFileHandler;
import pinkblob.event.ProjectInformationHandler;
import pinkblob.log.Log;
import pinkblob.tools.SendMail;

public class SendFinalDesignMail {

	/**
	 * @param args
	 */
	@SuppressWarnings("unchecked")
	public static void main(String[] args) throws Exception {
		Logger log = new Log().getLogger(SendRequirementsMail.class);
		log.info("About to send the test FinalDesign Mail");
		Map hm = new HashMap();
		hm.put("ProjectID", "3");
		hm.put("Comment", "Dies ist ein Test-Kommentar");
		
		//Uncomment the following lines, if you use this within the workflow
		DatabaseFileHandler dbfh = new DatabaseFileHandler();
		byte[] data = new byte[8];
		ProjectInformationHandler pih = new ProjectInformationHandler();
		pih.setProjectInformation(hm);
		dbfh.saveFile(3, "file.txt", new Date().getTime(), data);
		dbfh.setMailFlag(3, dbfh.getFiles(3).get(0).getId());
		
		
		SendMail.sendFinalDesign(hm);
	}
}
